<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页</title>

    <!--引入elementUi样式-->
    <script src="ElementUi/vue.js"></script>
    <script src="ElementUi/index.js"></script>
    <link rel="stylesheet" href="ElementUi/index.css">
    <style>
        .el-header, .el-footer {
            background-color: #B3C0D1;
            color: #333;
            text-align: right;
            line-height: 60px;
        }

        .el-aside {
            background-color: #D3DCE6;
            color: #333;
            text-align: center;
            line-height: 200px;
        }

        .el-main {
            background-color: #E9EEF3;
            color: #333;
            text-align: center;
            line-height: 160px;
        }

        body > .el-container {
            margin-bottom: 40px;
        }

        .el-container:nth-child(5) .el-aside,
        .el-container:nth-child(6) .el-aside {
            line-height: 260px;
        }

        .el-container:nth-child(7) .el-aside {
            line-height: 320px;
        }


    </style>
</head>
<body>
<div id="add">
    <!--这是整个框架-->
    <el-container>
        <!--这是最上面的头容器框-->
        <el-header>
            <el-dropdown>
  <span class="el-dropdown-link">
    用户信息<i class="el-icon-arrow-down el-icon--right"></i>
  </span>
                <el-dropdown-menu slot="dropdown">
                    <el-dropdown-item>联系管理员熊大</el-dropdown-item>
                    <el-dropdown-item>修改密码</el-dropdown-item>
                    <el-dropdown-item>退出登陆</el-dropdown-item>
                </el-dropdown-menu>
            </el-dropdown>
        </el-header>

    <!--+上面是头信息++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++=-->
    <el-container>
        <el-aside>
            <el-menu
                    default-active="2"
                    class="el-menu-vertical-demo"
                    @open="handleOpen"
                    @close="handleClose">
                <el-submenu index="1">
                    <template slot="title">
                        <i class="el-icon-location"></i>
                        <span>导航一</span>
                    </template>
                    <el-menu-item-group>
                        <el-menu-item index="1-1">选项1</el-menu-item>
                        <el-menu-item index="1-2">选项2</el-menu-item>
                    </el-menu-item-group>
                </el-submenu>

                <el-submenu index="2">
                    <template slot="title">
                        <i class="el-icon-location"></i>
                        <span>导航二</span>
                    </template>
                    <el-menu-item-group>
                        <el-menu-item index="2-1">选项1</el-menu-item>
                        <el-menu-item index="2-2">选项2</el-menu-item>
                    </el-menu-item-group>
                </el-submenu>
            </el-menu>
        </el-aside>

<!--++++++++++++++++++++++++++++++++++++++++++++下面是主要的内容++++++++++++++++++++++++++++++++++-->
        <el-main>
            <template>
            <el-table
                    :data="tableData"
                    style="width: 100%">

                <el-table-column
                        prop="date"
                        label="日期"
                        width="180">
                </el-table-column>

                <el-table-column
                        prop="name"
                        label="姓名"
                        width="180">
                </el-table-column>

                <el-table-column
                        prop="address"
                        label="地址">
                </el-table-column>
            </el-table>
        </template>
            <!--下面是分页-->
            <el-pagination
                    @current-change="handleCurrentChange"
                    :current-page="currentPage4"
                    :page-size="100"
                    layout="total, prev, pager, next, jumper"
                    :total="4000">
            </el-pagination>

        </el-main>

    </el-container>

    </el-container>
    <!--
    知识点 date对应的是vue中的data属性
      prop 对应的是key
       label 对应的是value
    -->
<!--+++++++++++++++++++++++++++++++++++++++上面是主要的内容++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->

</div>

</body>
<!--注意的是这里的js语言是最高的版本 要不然会报错-->
<script>
    //编写vue的基本框架
    var app = new Vue({
        //根据id进行定位
        el: "#add",
        //获取后台的数据
        data() {
            return {
                tableData:[
                    {date:"2019-07-16",name:"熊大",address:"上海"},
                    {date:"2019-07-17",name:"熊二",address:"北京"},
                    {date:"2019-07-18",name:"光头强",address:"天津"},
                    {date:"2019-07-19",name:"奇奇",address:"南京"},

                ]

            }
        },
        //钩子函数
        ceated() {

        },
        //集合函数
        methods: {
            //获取客户点击的当前页 传递给后台
            handleCurrentChange(page){
                console.log(page);
            }
        }
    });


</script>


</html>